package lhdx10;

public abstract class Automobile {
    private String type;
    private String brand;
    private String plateNumber;
    private int seat;
    private double dailyRent;
    private boolean state=true;

    public Automobile(String type,String brand, String plateNumber, int seat, double dailyRent,boolean state) {
        this.type=type;
        this.brand = brand;
        this.plateNumber = plateNumber;
        this.seat = seat;
        this.dailyRent = dailyRent;
        this.state=state;
    }

    protected Automobile() {
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getPlateNumber() {
        return plateNumber;
    }

    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }

    public int getSeat() {
        return seat;
    }

    public void setSeat(int seat) {
        this.seat = seat;
    }

    public double getDailyRent() {
        return dailyRent;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    public void setDailyRent(double dailyRent) {
        this.dailyRent = dailyRent;
    }
    public abstract double payment(int a);

    public void show(){
        System.out.println(type+"  "+brand+",车牌号:"+plateNumber+"日租金:"+dailyRent+"元， "+"座位数:"+seat+", "+(state?"当前可租":"当前不可租"));
    }
}
